﻿<navigation:Page x:Class="SMS.Views.Reports.IndividualCustomerPaymentHistory" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:my="clr-namespace:SMS.Controls;assembly=SMS.Controls"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Individual Customer Payment History">
    <Grid x:Name="LayoutRoot"
          Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="215" />
                <ColumnDefinition Width="3" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border BorderBrush="Black"
                    BorderThickness="1">
                <my:SMSReportControl Margin="5"></my:SMSReportControl>
            </Border>

            <Border Grid.Column="2"
                    BorderBrush="Black"
                    BorderThickness="1">
                <Grid Margin="5">
                    <sdk:DataGrid x:Name="grd_saleReport" AutoGenerateColumns="False" IsReadOnly="True" ItemsSource="{Binding SaleReportFilteredDataList}" SelectedItem="{Binding SelectedSaleReportFilterData, Mode=TwoWay}" >
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn Header="Group Name" Binding="{Binding GroupHeader}" ></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Header="Total Selling Amount" Binding="{Binding SellingAmount}"></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Header="Total Billing Amount" Binding="{Binding BilledAmount}"></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Header="Total Amount" Binding="{Binding TotalAmount}"></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Header="Discount" Binding="{Binding Discount}"></sdk:DataGridTextColumn>
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                </Grid>
            </Border>
        </Grid>
        <sdk:DataPager HorizontalAlignment="Right"
                       Grid.Row="1"
                       Source="{Binding Path=ItemsSource, ElementName=grd_saleReport}"
                       Width="250"
                       PageSize="13" />

        <Grid Grid.Row="3">
            <my:ErrorControl HorizontalAlignment="Left"
                             Name="errorControl1"
                             VerticalAlignment="Top" />
        </Grid>
    </Grid>
</navigation:Page>
